package com.afu.aopDemo.controller;

import com.afu.aopDemo.entity.Student;
import com.afu.aopDemo.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: StudentController
 * Package: com.afu.aopDemo.controller
 * Description:
 *
 * @Author zxf
 * @Create 2024/2/2 15:16
 * @Version 1.0
 */
@RestController
@RequestMapping("/student")
public class StudentController {
    @Autowired
    private IStudentService studentService;

    @PostMapping("/add")
    public int add(){
        int add = studentService.add(new Student());
        return 1;
    }
}
